package com.yida.common.core.enums;


/**
 * @Description 限时类型枚举类
 * @Author wws
 * @Date 2023-03-20
 */

public enum LimitTimeTypeEnum {

	/**
	 * 永久
	 */
	PERMANENT("0", "永久"),

	/**
	 * 限时
	 */
	LIMIT("1", "限时");

	private final String type;

	private final String desc;

	LimitTimeTypeEnum(String type, String desc) {
		this.type = type;
		this.desc = desc;
	}

	public String getType() {
		return type;
	}

	public String getDesc() {
		return desc;
	}

	public static String getDescByType(String type){
		for (LimitTimeTypeEnum value : LimitTimeTypeEnum.values()) {
			if(value.getType().equals(type)){
				return value.getDesc();
			}
		}
		return null;
	}
}
